<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<span th:text="${user.id}"></span><br>
<span th:text="${user.name}"></span><br>
<span th:text="${user.sex}"></span><br>
<span th:text="${user.age}"></span><br>
<hr/>
<div th:object="${user}">
    <span th:text="*{id}"></span><br>
    <span th:text="*{name}"></span><br>
    <span th:text="*{sex}"></span><br>
    <span th:text="*{age}"></span><br>
</div>

</body>
</html>